import axios from "axios"
axios.defaults.baseURL = 'http://59.110.235.240:5000'

// 获取当前用户信息
export let getcuruserinfo = params => axios.get('/users/accountinfo', { params })

// 用户登录
export let userlogin = params => axios.post('/users/checkLogin', params)

// 获取用户数据
export let getuserlist = params => axios.get('/users/list', { params })

// 删除指定用户
export let deluser = params => axios.get('/users/del', { params })

// 编辑用户信息
export let edituser = params => axios.post('users/edit', params)

// 删除多个用户
export let deluserss = params => axios.get('/users/batchdel', { params })

// 添加用户
export let adduser = params => axios.post('/users/add', params)

// 检查旧密码是否正确
export let checkoldpwd = params => axios.get('/users/checkoldpwd', { params })

// 修改当前用户密码
export let mynewpwd = params => axios.post('/users/editpwd', params)
